/**
 * Created by GadflyBSD on 16/3/12.
 */

angular.module('myApp.controllers', [])

//.controller('WangkaCtrl', function($scope) {})

	.controller('IndexCtrl', function($scope) {})

	.controller('createShopCtrl', function($scope) {
		$scope.settings = {
			enableFriends: true
		};
	})

	.controller('bindPersonCtrl', function($scope) {})

	.controller('orderListCtrl', function($scope) {})

	.controller('actionLogCtrl', function($scope) {})

	.controller('personManageCtrl', function($scope) {})

//popover ��
	.controller( 'NavCtrl',['$scope','$ionicPopover',function($scope,$ionicPopover){
		$ionicPopover.fromTemplateUrl('shop.html', {
			scope: $scope
		}).then(function(popover) {
			$scope.popover = popover;
		});

		$scope.openPopover = function($event) {
			$scope.popover.show($event);
		};

		$scope.elementPopover = function(id) {
			$scope.popover.show($("#"+id));
		};

		$scope.closePopover = function() {
			$scope.popover.hide();
		};
		// ���������
		$scope.$on('$destroy', function() {
			$scope.popover.remove();
		});
		// �����ظ������ִ��
		$scope.$on('popover.hidden', function() {
			// ִ�д���
		});
		// �Ƴ��������ִ��
		$scope.$on('popover.removed', function() {
			// ִ�д���
		});

	}])
//popover ֹ

